package expriment4_T1;

public class Phone {
    String brand;
    int price;
    String color;
    public Phone(String brand, int price, String color) {
        this.brand = brand;
        this.price = price;
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public String getBrand() {
        return brand;
    }

    public int getPrice() {
        return price;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return
                "品牌：" + brand + '\n'+
                "价钱：" + price +'\n'+
                "颜色：" + color + '\n' ;
    }
}
class PhoneDemo{
    public static void main(String[] args) {
        Phone phone = new Phone("iphone", 10, "green");
        System.out.println(phone);
    }
}
